﻿package org.net.DMsg
{
	import com.gowin.Net.Structs.NPCAction;
	
	import flash.utils.IDataInput;
	//.NPC动作
    //@23(short)|length(short)|num(short)|[npcname(utf)|x(short)|y(short)|hp(short)|state(0无 1被打 2 死,3攻击)(short)]...#
	public class DMsg23 extends DMsg
	{
		public var npcActons:Array = new Array();
		
		public function DMsg23()
		{
			id = 23;
		}
		
		public override function read(dis:IDataInput):void
		{
			var num:int = dis.readShort();
			for(var i:int = 0 ; i < num ; i ++)
			{
				var npc:NPCAction = new NPCAction();
				
				npc.NPCName = dis.readUTF();
				npc.X = dis.readShort();
				npc.Y = dis.readShort();
				npc.HP = dis.readShort();
				npc.State = dis.readShort();
				
				npcActons[i] = npc;
			}			
		}

	}
}